<template>
    <el-image v-if="checkType(scope.row[prop]) == 'image'" :src="scope.row[prop]" style="height: 60px;" :preview-src-list="srcList"
        preview-teleported></el-image>
    <video v-else-if="checkType(scope.row[prop]) == 'video'" :src="scope.row[prop]" controls style="width: 100%;height: 100%;"></video>
</template>
<script setup>
import { ref, computed, watch, toRefs } from 'vue'
import {checkType} from '@/utils/checkType.js'
const props = defineProps({
    scope: {
        type: Object,
        defalut: {}
    },
    prop: {
        type: String,
        defalut: ''
    }
})
const srcList = ref([])
const { scope, prop } = toRefs(props)
if (/\.(jpg|jpeg|bmp|png|GIF|JPG|PNG|BMP)$/.test(scope.value.row[prop.value])) {
    srcList.value.push(scope.value.row[prop.value])   
    }
</script>
<style lang="less" scoped></style>
